package com.example.demo1.service;

import com.example.demo1.entity.Score;
import com.example.demo1.repository.ScoreRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class ScoreService {
    private final ScoreRepository scoreRepository;

    public List<Score> getStudentScores(Long studentId) {
        return scoreRepository.findByStudentIdOrderByExamDateDesc(studentId);
    }
} 